package com.xinxing.learning.batch.mybatisplus.listener;

import com.xinxing.learning.batch.common.LogConstants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.listener.JobExecutionListenerSupport;

@Slf4j
public class MybatisPlusSqlJobEndListener extends JobExecutionListenerSupport {
    @Override
    public void afterJob(JobExecution jobExecution) {
        if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
            log.debug(LogConstants.LOG_TAG + " batch job complete!");
        }
    }
}
